//获取节点
//获取轮播盒子
var ban = document.getElementById("ban");
//获取每张图片
var imgs = document.getElementsByTagName("img");
//获取ul
var Ul = document.getElementById("Ul");
//获取每个li
var lis = Ul.getElementsByTagName("li");
var btnL = document.getElementById("btnL");
var btnR = document.getElementById("btnR");
//console.log(btnL);
//console.log(lis);//检测节点是否被获取
//封装函数
var index = 0; /*图片的索引*/
function bo(){
     index++;
     if(index == 5){
     	index =0;
     }
	 for(var i=0; i<imgs.length;i++){
	 	imgs[i].style.display = "none"; //隐藏所有的图片
	 }
	 imgs[index].style.display = "block";
	 for(var i=0;i<lis.length;i++){
	 	lis[i].style.background = "#000";
	 }
	 lis[index].style.background = "red";
 }/*封装函数的结束*/
//加定时器让图片动起来
setInterval(bo,2000);

//左边按钮
btnL.onclick = function(){
	
}
//右边按钮
btnR.onclick = function(){
	
}